home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Tutorial Material
/
Zone Tutorial
/
Structure Examples
/
5. Struct2
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
2KB
|
77 lines
; STRUCT2 - for solo keyboard (pt1)
(gen-hopalong-symbol xmel (a g) ymel (a g) 100 200 300 0.45 32 0)
(setq mel1 (find-change xmel))
(setq mel2 (find-change ymel))
(gen-hopalong-vector tonx tony 100 200 300 0.45 7 0)
(create-tonality scale1 (vector-to-list (vector-round 1 12 tonx)))
(create-tonality scale2 (vector-to-list (vector-round 1 12 tony)))
(gen-hopalong-symbol xmel1 (a g) ymel2 (a g) 100 300 500 0.45 24 0)
(setq mel3 (find-change xmel1))
(setq mel4 (find-change ymel2))
(gen-hopalong-vector ton1x ton1y 100 300 500 0.45 7 0)
(create-tonality scale3 (vector-to-list (vector-round 1 12 ton1x)))
(create-tonality scale4 (vector-to-list (vector-round 1 12 ton1y)))
(gen-hopalong-symbol xmel3 (a g) ymel4 (a g) 100 500 700 0.45 12 0)
(setq mel5 (find-change xmel3))
(setq mel6 (find-change ymel4))
(gen-hopalong-vector ton2x ton2y 100 500 700 0.45 7 0)
(create-tonality scale5 (vector-to-list (vector-round 1 12 ton2x)))
(create-tonality scale6 (vector-to-list (vector-round 1 12 ton2y)))
; Nigel has been using tick value 96 for 1/4 note.
; Because Nigel often mixes ticks and ratios, the function must take
; both cases into account.
(defun use-nigel-ticks (l)
(let (out)
(dolist (x l)
(if (is-length-symbol x)
(push x out)
(push (* x 5) out)))
(nreverse out)))
(setq rhy1 (use-nigel-ticks (append (symbol-repeat 28 '(48)) '(24 24 24 24))))
(setq rhy2 (use-nigel-ticks (append (symbol-repeat 21 '(48)) '(32 32 32))))
(setq rhy3 (use-nigel-ticks (append (symbol-repeat 10 '(48)) '(96 96))))
(setq zone1 (list (make-zone rhy1) (make-zone rhy2) (make-zone rhy3)))
; --> (1440 1104 672)
(def-symbol
pnrh (append mel1 mel3 mel5)
pnlh (append mel2 mel4 mel6)
)
(def-length
pnrh (append rhy1 rhy2 rhy3)
pnlh (append rhy1 rhy2 rhy3)
)
(def-tonality
pnrh (activate-tonality (scale1 c 6) (scale3 c 6) (scale5 c 6))
pnlh (activate-tonality (scale2 c 5) (scale4 c 5) (scale6 c 5))
)
(def-zone
pnrh zone1
pnlh zone1
)
(compile-instrument-p "ccl;output:" "pno"
pnrh
pnlh
)